using System;

namespace EOSDigital.SDK
{
	public struct PictureStyleDesc
	{
		public int Contrast;

		public int Sharpness;

		public int Saturation;

		public int ColorTone;

		public FilterEffect FilterEffect;

		public ToningEffect ToningEffect;

		public int SharpFineness;

		public int SharpThreshold;

		public PictureStyleDesc(int Contrast, int Sharpness, int Saturation, int ColorTone, int FilterEffect, int ToningEffect)
		{
			this.Contrast = Math.Min(4, Math.Max(-4, Contrast));
			this.Sharpness = Math.Min(7, Math.Max(0, Sharpness));
			this.Saturation = Math.Min(4, Math.Max(-4, Saturation));
			this.ColorTone = Math.Min(4, Math.Max(-4, ColorTone));
			this.FilterEffect = (FilterEffect)FilterEffect;
			this.ToningEffect = (ToningEffect)ToningEffect;
			this.SharpFineness = 0;
			this.SharpThreshold = 0;
		}

		public static bool operator ==(PictureStyleDesc x, PictureStyleDesc y)
		{
			if (x.Contrast == y.Contrast && x.Sharpness == y.Sharpness && x.Saturation == y.Saturation && x.ColorTone == y.ColorTone && x.FilterEffect == y.FilterEffect)
			{
				return x.ToningEffect == y.ToningEffect;
			}
			return false;
		}

		public static bool operator !=(PictureStyleDesc x, PictureStyleDesc y)
		{
			return !(x == y);
		}

		public override bool Equals(object obj)
		{
			if (obj is PictureStyleDesc)
			{
				return this == (PictureStyleDesc)obj;
			}
			return false;
		}

		public override int GetHashCode()
		{
			int num = -2128831035;
			num *= (0x1000193 ^ this.Contrast.GetHashCode());
			num *= (0x1000193 ^ this.Sharpness.GetHashCode());
			num *= (0x1000193 ^ this.Saturation.GetHashCode());
			num *= (0x1000193 ^ this.ColorTone.GetHashCode());
			num *= (0x1000193 ^ this.FilterEffect.GetHashCode());
			return num * (0x1000193 ^ this.ToningEffect.GetHashCode());
		}

		public override string ToString()
		{
			return string.Format("{0},{1},{2},{3},{4},{5}", this.Sharpness, this.SharpFineness, this.SharpThreshold, this.Contrast, this.Saturation, this.ColorTone);
		}
	}
}
